﻿@{
    ViewBag.Title = "首页";
    Layout = "~/Views/Shared/_LayoutToHome.cshtml";
}


<div class="row" >
    
    <div class="col-md-12 " style="text-align:center">
        <img src="~/img/logo2.png" class="layui-anim layui-anim-down" alt="logo" style="width: 222px;height: 166px" />
        <p id="welcome">欢迎使用</p>
        @if (User.Identity.Name.IsEmpty())
        {
            <a href="/Account/Login" id="startToUse" class=" layui-btn  layui-btn-lg layui-btn-radius layui-btn-normal layui-anim layui-anim-scaleSpring">开始使用</a>
        }
        else
        {
            if (User.IsInRole("teachers") || User.IsInRole("admin"))
            {
            <a href="/Curricula/Index" id="startToUse" class=" layui-btn  layui-btn-lg layui-btn-radius layui-btn-normal layui-anim layui-anim-scaleSpring">开始使用</a>
            }else if (User.IsInRole("students"))
            {
             <a href="/Curricula/StuIndex" id="startToUse" class=" layui-btn  layui-btn-lg layui-btn-radius layui-btn-normal layui-anim layui-anim-scaleSpring">开始使用</a>
            }
            
        }
    </div>
</div>
@*<span id="current-time" class="pull-right layui-font-blue" style="font-family: KaiTi; font-style:italic"></span>
<script type="text/javascript">
    var now = (new Date()).toLocaleString();
    $('#current-time').text(`现在是 ${now}`);
    setInterval(function () {
        var now = (new Date()).toLocaleString();
        $('#current-time').text(`现在是 ${now}`);
    }, 1000);
</script>*@


